﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NS.Utilities;
using NS.BLL.Systems;

public partial class Select_Company : System.Web.UI.Page
{
    private long ParentID = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ParentID"] != null)
        {
            ParentID = Convert.ToInt32(Request.QueryString["ParentID"]);
        }
        if (!IsPostBack)
        {
            GridViewBind();
        }
    }
    protected void GridViewBind()
    {
        FGridView1.SQLString = CompanyService.GetListStr(ParentID, txtName.Text.Trim());
        FGridView1.PKey = "CompanyID";
        FGridView1.OrderName = "CompanyID";
        FGridView1.BindData();
        FGridView1.AddControl();
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        GridViewBind();
    }
}